<?php
/*
Template Name: Events
Description: This part is optional, but helpful for describing the Post Template
*/

?>
<?php get_header ();?>
    <body>

<div class="container">

<div class="header">
    <ul>
          <li class="f">
        <div class="logo"> <a href="index.html"><img  src="<?php echo get_template_directory_uri ();?>/images/Mahally-logo.png" /> </a></div>
      </li>
          <li class="f-r">
        <div class="menu ">
              <div class="search f-r">
            <div class="search-warper"> search
                  <input name="search-txt" class="search-txt" id="search" >
                  </textarea>
                </div>
          </div>
              <div class="clearfix"> </div>
              <ul>
              <?php

				$defaults = array(
					'theme_location'  => '',
					'menu'            => '',
					'container'       => 'ul',
					'container_class' => '',
					'container_id'    => '',
					'menu_class'      => 'f',
					'menu_id'         => '',
					'echo'            => true,
					'fallback_cb'     => 'wp_page_menu',
					'before'          => '',
					'after'           => '',
					'link_before'     => '',
					'link_after'      => '',
					'items_wrap'      => '%3$s',
					'depth'           => 0,
					'walker'          => ''
				);
				
				wp_nav_menu( $defaults );
				
				?>
          </ul>
            </div>
      </li>
        </ul>
  </div>
      <ul>
    <li class="f">
          <div class="sidebar">
        <div class="design"><img src="<?php echo get_template_directory_uri ();?>/images/SHOW-ROOM.png"/> </div>
        <div id="embeddedExample" style="">
              <div class="calander">
            <div class="pic"> <img src="<?php echo get_template_directory_uri ();?>/images/calnder.png" /></div>
            <br />
            <div id="calendar" > </div>
            <br />
            <div id="embeddedDateField" class="dateField"> </div>
            <br />
          </div>
            </div>
      </div>
        </li>
    <li class="f-r">
          <div class="content f-r">
        <div class="top"> </div>
        <div class="middle-events">
              <h1> Up Comming Events </h1>
              <div id="content"> 
            
            <!-- Start contentslider-std -->
            
            <div class="sliderkit contentslider-std">
                  <div class="sliderkit-btn sliderkit-go-btn sliderkit-go-prev"><a href="#" title="Previous"><span>Previous</span></a></div>
                  <div class="sliderkit-btn sliderkit-go-btn sliderkit-go-next"><a href="#" title="Next"><span>Next</span></a></div>
                  <div class="sliderkit-nav"> </div>
                  <div class="sliderkit-panels">
                   
                <div class="sliderkit-panel">
                      <ul>
                    <li class="f">
                          <div class="prev"> </div>
                        </li>
                    <li class="f">
                    <?php $counter=0;?>
                    <?php
							$category_id = get_cat_ID('events');
							//echo $category_id;
							$args = array( 'category' => $category_id  ,'numberposts'     => -1 ,'post_status'     => 'any',);
							$lastposts = get_posts( $args );
							foreach($lastposts as $post) : setup_postdata($post); ?>
                            <?php $counter++;?>
                <?php if ($counter%4==0){echo '</li>
                    <li class="f-r">
                          <div class="next"> </div>
                        </li>
                  </ul>
                    </div><div class="sliderkit-panel">
                      <ul>
                    <li class="f">
                          <div class="prev"> </div>
                        </li>
                    <li class="f">';}?>
                          <div class="event-content"> <?php the_post_thumbnail();?>
                        <div class="date-bg f">
                              <p><?php the_time('j'); ?></p>
                            </div>
                        <h2><?php the_title(); ?></h2>
                        <h3><?php the_time('F,Y'); ?></h3>
                        <p> <? the_content(); ?> </p>
                        <h3>-----------------------------------------------------------</h3>
                      </div>
                          <div class="clearfix"> </div>
                          
                          <?php endforeach; ?>
                        </li>
                    <li class="f-r">
                          <div class="next"> </div>
                        </li>
                  </ul>
                    </div>
                
                
              </div>
                </div>
            <!-- // end of contentslider-std --> 
            
          </div>
            </div>
        <div class="bottom"> </div>
      </div>
        </li>
  </ul>
    </div>
</div>
<?php include 'footer.php' ?>
